package cn.caplike.demo.spring.bean.lifecycle.initializing.bean.and.disposable.bean.callback.interfaces;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author LiKe
 * @version 1.0.0
 * @date 2020-03-31 17:34
 */
public class Client {

    public static void main(String[] args) {
        AbstractApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("bean-initializing-bean-and-disposable-bean-callback-interfaces.xml");
        Book book = (Book) applicationContext.getBean("book");
        System.out.println("book: " + book);
        applicationContext.registerShutdownHook();
    }
}
